package xyz.kongbai121.common.utils;

import java.io.Serializable;

/**
 * @author ljq
 * @version 1.0.0
 * @Description
 * @createTime 2021年11月05日 11:12:00
 */
public enum ResultCode implements Serializable {

    SUCCESS(200, "成功"),
    FAIL(400, "失败"),

    VALUE_IS_NULL(400, "值为null"),
    VALUE_IS_EMPTY(400, "值为空"),
    VALUE_IS_BLANK(400, "值为空白"),

    PARAMETER_ERROR(400, "参数错误"),
    SYSTEM_BUSY(400, "系统繁忙，请稍后再试"),
    NO_AUTHORIZED(400, "没有访问权限"),
    FREQUENT_OPERATION(400, "频繁操作"),
    ILLEGAL_OPERATION(400, "非法操作"),
    UNABLE_TO_OBTAIN(400, "无法获取"),
    Not_Belong_Current_User(400, "不属于当前用户"),

    EXCEPTION(1, "系统出错啦"),
    CONN_ERR(2, "连接失败"),
    PARAM_EMPTY(3, "缺少参数"),
    PARAM_ILLEGAL(4, "参数格式非法"),
    DATA_EMPTY(5, "数据缺失"),
    DATA_NOT_FOUND(6, "没有找到匹配的数据"),
    CONDITION_NOT_MATCH(7, "没有找到匹配的数据"),
    DATA_ILLEGAL(8, "数据格式非法"),
    DATA_ERROR(9, "数据格式非法"),
    ERROR(10, "操作失败"),
    OPERATION_UNSUPPORTED(11, "当前版本不支持的操作"),
    LOGIN_REQUIRED(12, "需要登录"),
    SERVER_NOT_START(13, "服务器未启动"),
    TOKEN_ILLEGAL(14, "token验证不通过"),
    SERVER_RESTRICTED(15, "服务器维护中"),
    ;


    private static final int CODE_SUCCESS = 0;

    private String developDetail = "";

    private String onlineDetail = "";

    private int developCode = 0;

    private int onlineCode = 0;

    //策划还没有配置对应的错误码
    private boolean isDeveloping = true;

    private static final long serialVersionUID = 3952740639419677143L;

    private ResultCode(int developCode, String developDetail) {
        this.developCode = developCode;
        this.developDetail = developDetail;
    }


    public int getDevelopCode() {
        return this.developCode;
    }

    public String getDevelopDetail() {
        return this.developDetail;
    }
}
